﻿using System;
using Microsoft.Xna.Framework;

namespace Terraria.World.Generation
{
	// Token: 0x02000085 RID: 133
	public static class Biomes<T> where T : MicroBiome, new()
	{
		// Token: 0x06000A06 RID: 2566 RVA: 0x0000ADAA File Offset: 0x00008FAA
		public static bool Place(int x, int y, StructureMap structures)
		{
			return Biomes<T>._microBiome.Place(new Point(x, y), structures);
		}

		// Token: 0x06000A07 RID: 2567 RVA: 0x0000ADC3 File Offset: 0x00008FC3
		public static bool Place(Point origin, StructureMap structures)
		{
			return Biomes<T>._microBiome.Place(origin, structures);
		}

		// Token: 0x06000A08 RID: 2568 RVA: 0x0000ADD6 File Offset: 0x00008FD6
		public static T Get()
		{
			return Biomes<T>._microBiome;
		}

		// Token: 0x06000A09 RID: 2569 RVA: 0x003E5830 File Offset: 0x003E3A30
		private static T CreateInstance()
		{
			T t = Activator.CreateInstance<T>();
			BiomeCollection.Biomes.Add(t);
			return t;
		}

		// Token: 0x04000EA2 RID: 3746
		private static T _microBiome = Biomes<T>.CreateInstance();
	}
}
